

import re
import json


def extract_json():
    # Extract JSON code block
    match = re.search(r'```json(.*?)```', content, re.DOTALL)
    if match:
        data = json.loads(match.group(1))
        return data
    else:
        return {}


def set_system_prompt(tools):
    return {"role": "system",
"content": "If the author intends to call a tool(from {'/'.join(tools)}), please output the tool name (with the arguments in json format) at the end of the response in Markdown. Otherwise reply normally. "}
